<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>PlanarGC: CutPlanar.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">PlanarGC
   &#160;<span id="projectnumber">1.0.2</span>
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('a00034_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">CutPlanar.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*****************************************************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">*    PlanarCut - software to compute MinCut / MaxFlow in a planar graph      *</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">*                                Version 1.0                                 *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">*                                                                            *</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">*    Copyright 2011 Eno Töppe &lt;toeppe@in.tum.de&gt;                             *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">*                   Frank R. Schmidt &lt;fschmidt@uwo.ca&gt;                       *</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">******************************************************************************</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">  If you use this software for research purposes, YOU MUST CITE the following </span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">  paper in any resulting publication:</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">    [1] Efficient Planar Graph Cuts with Applications in Computer Vision.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">        F. R. Schmidt, E. Töppe, D. Cremers, </span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">            IEEE CVPR, Miami, Florida, June 2009                </span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">******************************************************************************</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">  This software is released under the LGPL license. Details are explained</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">  in the files &#39;COPYING&#39; and &#39;COPYING.LESSER&#39;.</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">        </span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">*****************************************************************************/</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef __CUTPLANAR_H__</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define __CUTPLANAR_H__</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor"></span><span class="comment">/*</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">Some EXCEPTIONS 2B DEFINED FOR</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment">CyclesDetected, SourceBlocked, InvalidGraph, PreFlowNotRun</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;PlanarException.h&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &quot;CutPlanarDefs.h&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &quot;Planar.h&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &quot;DynPath.h&quot;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;CGraph.h&quot;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="code" href="a00014.html">   37</a></span>&#160;<span class="keyword">class </span><a class="code" href="a00014.html">CutPlanar</a> </div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;{</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="code" href="a00014.html#af983f91190c5224893356521f21e99a9">   54</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="a00014.html#af983f91190c5224893356521f21e99a9">FIRST_VERT</a> =  0;</div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="code" href="a00014.html#a95213936871b5116719676330cbc75c2">   55</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="a00014.html#a95213936871b5116719676330cbc75c2">LAST_VERT</a>  = -1;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110">   57</a></span>&#160;  <span class="keyword">enum</span> <a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110">ECheckFlags</a> </div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  {</div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110ab74ad417a936bbd77827fe2b560ca9a4">   70</a></span>&#160;    <a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110ab74ad417a936bbd77827fe2b560ca9a4">CHECK_NONE</a>              = 0x00,</div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110a7a72cb29c193c0029de062d851c40006">   72</a></span>&#160;    <a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110a7a72cb29c193c0029de062d851c40006">CHECK_CONNECTIVITY</a>      = 0x01,</div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110a0da108f71c5e9ba59ffd097b36fc4952">   74</a></span>&#160;    <a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110a0da108f71c5e9ba59ffd097b36fc4952">CHECK_NON_NEGATIVE_COST</a> = 0x02,</div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110a74dda39f2501ddcf8c1822b930c54f8b">   76</a></span>&#160;    <a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110a74dda39f2501ddcf8c1822b930c54f8b">CHECK_PLANARITY</a>         = 0x04,</div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110af0958b77d78384feb3acccf4e6ffdc02">   78</a></span>&#160;    <a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110af0958b77d78384feb3acccf4e6ffdc02">CHECK_ALL</a>               = 0xFF, </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;  };</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="code" href="a00014.html#a0e28d67a0303b0b1a43bb9abbad02989">   81</a></span>&#160;  <span class="keyword">enum</span> <a class="code" href="a00014.html#a0e28d67a0303b0b1a43bb9abbad02989">ELabel</a></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  {</div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="code" href="a00014.html#a0e28d67a0303b0b1a43bb9abbad02989a322bd84e5ca9be01787d0c08b488c127">   88</a></span>&#160;    <a class="code" href="a00014.html#a0e28d67a0303b0b1a43bb9abbad02989a322bd84e5ca9be01787d0c08b488c127">LABEL_SINK</a>   = 0,</div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="code" href="a00014.html#a0e28d67a0303b0b1a43bb9abbad02989a4a87e4f2960247d1c734c50865a6c842">   90</a></span>&#160;    <a class="code" href="a00014.html#a0e28d67a0303b0b1a43bb9abbad02989a4a87e4f2960247d1c734c50865a6c842">LABEL_SOURCE</a> = 1,</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  };</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  <span class="comment">//allocates memory for nodes, edges and faces</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;  <a class="code" href="a00014.html#a9c9bcc2d4f1809b4799346e6ec14ed5b">CutPlanar</a>();</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  <span class="keyword">virtual</span> <a class="code" href="a00014.html#ab64514d394394d5095db7f199960c71c">~CutPlanar</a>();</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  <span class="comment">//define graph</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;  <span class="comment">//class works in state, i.e., the arrays may be altered.</span></div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="comment"></span>  <span class="keywordtype">void</span> <a class="code" href="a00014.html#a415e8e9f3222cc883aa92964847d9fbe">initialize</a>(<span class="keywordtype">int</span> numVerts, <a class="code" href="a00027.html">PlanarVertex</a> *vertexList,</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;                  <span class="keywordtype">int</span> numEdges, <a class="code" href="a00025.html">PlanarEdge</a>   *edgeList,</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;                  <span class="keywordtype">int</span> numFaces, <a class="code" href="a00026.html">PlanarFace</a>   *faceList,</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;                  <span class="keywordtype">int</span> idxSource          = <a class="code" href="a00014.html#af983f91190c5224893356521f21e99a9">FIRST_VERT</a>,  <span class="comment">//sets which node should be source</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;                  <span class="keywordtype">int</span> idxSink            = <a class="code" href="a00014.html#a95213936871b5116719676330cbc75c2">LAST_VERT</a>,   <span class="comment">//sets which node should be sink</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;                  <a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110">ECheckFlags</a> checkInput = <a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110af0958b77d78384feb3acccf4e6ffdc02">CHECK_ALL</a>);  <span class="comment">//enables advanced input validation</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="a00014.html#a8ea383a874b9b9eb68708b0dc41df26d">setSource</a>(<span class="keywordtype">int</span> idxSource);</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="a00014.html#a4b7c9212072ac58174b4ad0a9691b961">setSink</a>  (<span class="keywordtype">int</span> idxSink);</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;  <span class="keywordtype">double</span> <a class="code" href="a00014.html#a843ed38fe06946e7fdbdad011a71639e">getMaxFlow</a>();</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;  <a class="code" href="a00014.html#a0e28d67a0303b0b1a43bb9abbad02989">ELabel</a>      <a class="code" href="a00014.html#acf0d49ee5b2e7ce0fa5fda70898bbd23">getLabel</a>(<span class="keywordtype">int</span> node);                <span class="comment">// returns the label of a node</span></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;<span class="comment"></span>  std::vector&lt;int&gt; <a class="code" href="a00014.html#aa170890c9d7ed4a668cfa738ad7ed503">getLabels</a>(<a class="code" href="a00014.html#a0e28d67a0303b0b1a43bb9abbad02989">ELabel</a> label);      <span class="comment">// returns all nodes of a specific label</span></div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<span class="comment"></span>  std::vector&lt;int&gt; <a class="code" href="a00014.html#a2ecd800c5a00d2839f282ba69d360d62">getCutBoundary</a>(<a class="code" href="a00014.html#a0e28d67a0303b0b1a43bb9abbad02989">ELabel</a> label); <span class="comment">// returns all cut-nodes in the source or the sink set</span></div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;<span class="comment"></span>  std::vector&lt;int&gt; <a class="code" href="a00014.html#afde8ab5c6700ea7ab214e2bb8082086f">getCircularPath</a>();</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00014.html#a01a9e90b3328391eae17620dea2fabb3">preFlow</a>();</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00014.html#af2f6768ff02dbf059f9fcdc019684e1a">performChecks</a>(<a class="code" href="a00014.html#a4458e544274ff10532f3d31c150c0110">ECheckFlags</a> checks);</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;  </div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;  <span class="comment">// planar encoding</span></div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;  <span class="keywordtype">int</span> nVerts;</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;  <span class="keywordtype">int</span> nEdges;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;  <span class="keywordtype">int</span> nFaces;</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;  <a class="code" href="a00027.html">PlanarVertex</a> *verts;</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;  <a class="code" href="a00026.html">PlanarFace</a>   *faces;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;  <a class="code" href="a00025.html">PlanarEdge</a>   *edges;</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;  <span class="comment">// source and sink</span></div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;  <span class="keywordtype">int</span> sourceID; <span class="comment">// previously PlanarVertex *pvSource</span></div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;  <span class="keywordtype">int</span> sinkID;   <span class="comment">// previously PlanarVertex *pvSink</span></div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;  </div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;  <span class="keywordtype">bool</span> computedFlow; <span class="comment">// stores whether the flow is already computed</span></div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;                     <span class="comment">// has to be maintained by &#39;maxflow&#39; and &#39;initialize&#39;</span></div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;  <span class="keywordtype">double</span> maxFlow;</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;  <span class="keywordtype">double</span> capEps;     <span class="comment">// zero capacity darts are replaced by this value</span></div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;  <a class="code" href="a00026.html">PlanarFace</a> *pfStartOfCut; <span class="comment">//if computedFlow, retains the first </span></div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;                            <span class="comment">//face of the cut loop in T*</span></div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;  <span class="comment">//primal spanning tree</span></div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;  DynLeaf *primalTreeNodes; <span class="comment">//nodes of the primal spanning tree</span></div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;  DynLeaf *plSource;  <span class="comment">//pointer on source in primal spanning tree</span></div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;  DynLeaf *plSink;    <span class="comment">//pointer to sink in primal spanning tree</span></div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;  <span class="comment">//dual spanning tree</span></div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;  <a class="code" href="a00026.html">PlanarFace</a> **dualTreeParent; <span class="comment">// dual tree parent relationship</span></div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;  <a class="code" href="a00025.html">PlanarEdge</a> **dualTreeEdge;  <span class="comment">// dual tree fast edge-access</span></div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;  <span class="comment">//labeling</span></div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;  <span class="keywordtype">bool</span> completelyLabeled;</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;  <span class="keywordtype">bool</span> *isLabeled;</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;  <a class="code" href="a00014.html#a0e28d67a0303b0b1a43bb9abbad02989">ELabel</a> *labels;</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;  </div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;  <span class="comment">//set during constructSpanningTrees() if Source is blocked</span></div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;  <span class="keywordtype">bool</span> isSourceBlocked; </div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;  <span class="comment">//definition of planar input graph</span></div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;  <span class="comment">//auxiliary inline functions</span></div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;  <span class="keywordtype">int</span> getVertIndex(<a class="code" href="a00027.html">PlanarVertex</a> *pv) {<span class="keywordflow">return</span> pv - verts;}</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;  <span class="keywordtype">int</span> getFaceIndex(<a class="code" href="a00026.html">PlanarFace</a> *pf)   {<span class="keywordflow">return</span> pf - faces;}</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;  <span class="keywordtype">int</span> getDynNodeIndex(DynLeaf *pl)   {<span class="keywordflow">return</span> pl - primalTreeNodes;}</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;  <span class="comment">//constructs the primal and dual spanning trees used by maxflow()</span></div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;  <span class="keywordtype">void</span> constructSpanningTrees();</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;};</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<hr class="footer"/><address style="text-align: right;"><small>
  &copy; 2009 - 2013 by Eno T&ouml;ppe, Frank R. Schmidt
  <br/>
  generated by <a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a>
</small></address>
